<div id="article-editor">
    <editor :config="config"></editor>
</div>

<script>
    var config = {
        fullscreen: true, // 控制是否显示全屏按钮
        // 添加一些many2one的配置项
        // @string：会直接显示在添加按钮中
        // @model：many2one实际的模块
        // @name：会显示在many2one输入框的最右边，用来标识这个输入框
        // @domain：many2one实际的domain
        many2one: [
            {string: '添加产品', model: 'product.template', name: '产品'},
            {string: '添加广告墙', model: 'mshop.ad.wall', name: '广告墙'},
            {string: '添加文章', model: 'mshop.article', name: '文章'}
        ],
        osv: {
            model: 'mshop.article',
            model_line: 'mshop.article.line',
            field: 'line_ids',
            editor_field: 'article_id',
            editor_id: ${editor_id},
            shop_id: ${shop_id},
        }
    };

    new Vue({
        el: '#article-editor',
        data: {
            config: config,
        }
    })
</script>
